var QQMapWX = require('../../utils/qqmap-wx-jssdk.min');
var qqmapsdk;
Page({

    /**
     * 页面的初始数据
     */
    data: {

    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
        let tabbar = this.getTabBar()
        //    console.log("tabbar=>",tabbar);
        tabbar.setData({
            current: 3
        })
        // 实例化API核心类
        qqmapsdk = new QQMapWX({
            key: 'AFNBZ-AOYWP-R3BDV-LVOLT-SGHHT-AWFTP'
        });

    },
    onShow() {
        wx.getLocation({
            success(res) {
                let latitude = res.latitude
                let longitude = res.longitude
                qqmapsdk.search({
                    keyword:'影院',
                    location: `${latitude},${longitude}`,
                    success(res2){
                        console.log("res2==>",res2);
                    }
                })
            }
        })
    }


})